import React, { useState } from 'react';
import UserMemoView from './usememo/UserMemoView';

const App = () => {
  let [count, setCount] = useState(0)
  let [age, setUser] = useState(0)
  return (
    <div>
      <h1>App 根组件---count: {count}</h1>
      <h1>App 根组件---Age: {age}</h1>
      <div>
        <button type="button" onClick={() => {
          setCount(count + 1)
        }}>setCount</button>
        <button type="button" onClick={() => {
          setUser(age + 1)
        }}>setUser</button>
      </div>

      <UserMemoView count={count} age={age}>
        <h1>UserMemoView组件</h1>
      </UserMemoView>

    </div>
  );
}

export default App;
